package com.bitmain.mmst.miner.monitor.executor;
/**
 * 
 *
 * @author Richard - rui.wu@bitmain.com
 * @since 2016年7月20日 
 *
 */
public class MinerCommandMessage {
	/**
	 * 机架Id
	 */
	private long shelfId;

	/**
	 * 矿机类型Id
	 */
	private long minerTypeId;

	/**
	 * 矿机IP
	 */
	private String host;

	/**
	 * 矿机端口号
	 */
	private Integer port;

	/**
	 * 矿机mac地址
	 */
	private String mac;

	/**
	 * 矿机状态信息
	 */
	private String stats;

	/**
	 * 矿机汇总信息
	 */
	private String summary;

	/**
	 * 矿机矿池信息
	 */
	private String pools;

	/**
	 * 是否能ping通
	 */
	private Boolean pingable;

	/**
	 * 是否能获取mac地址
	 */
	private Boolean macable;

	/**
	 * 是否能获取矿机状态信息
	 */
	private Boolean statsable;

	/**
	 * 是否能获取矿机汇总信息
	 */
	private Boolean summaryable;

	/**
	 * 是否能获取矿池信息
	 */
	private Boolean poolsable;

	/**
	 * 所有命令是否执行完成
	 */
	private Boolean commandable;

	/**
	 * 检测完成时间 
	 */
	private long executeTime;

	private String ipBlock;
	private int ipIndex;
	
	
	public String getIpBlock() {
		return ipBlock;
	}

	public void setIpBlock(String ipBlock) {
		this.ipBlock = ipBlock;
	}

	public int getIpIndex() {
		return ipIndex;
	}

	public void setIpIndex(int ipIndex) {
		this.ipIndex = ipIndex;
	}

	public long getShelfId() {
		return shelfId;
	}

	public void setShelfId(long shelfId) {
		this.shelfId = shelfId;
	}

	public long getMinerTypeId() {
		return minerTypeId;
	}

	public void setMinerTypeId(long minerTypeId) {
		this.minerTypeId = minerTypeId;
	}

	public String getHost() {
		return host;
	}

	public void setHost(String host) {
		this.host = host;
	}

	public Integer getPort() {
		return port;
	}

	public void setPort(Integer port) {
		this.port = port;
	}

	public String getMac() {
		return mac;
	}

	public void setMac(String mac) {
		this.mac = mac;
	}

	public String getStats() {
		return stats;
	}

	public void setStats(String stats) {
		this.stats = stats;
	}

	public String getSummary() {
		return summary;
	}

	public void setSummary(String summary) {
		this.summary = summary;
	}

	public String getPools() {
		return pools;
	}

	public void setPools(String pools) {
		this.pools = pools;
	}

	public Boolean getPingable() {
		return pingable;
	}

	public void setPingable(Boolean pingable) {
		this.pingable = pingable;
		addCommandable(pingable);
	}

	public Boolean getMacable() {
		return macable;
	}

	public void setMacable(Boolean macable) {
		this.macable = macable;
		addCommandable(macable);
	}

	public Boolean getStatsable() {
		return statsable;
	}

	public void setStatsable(Boolean statsable) {
		this.statsable = statsable;
		addCommandable(statsable);
	}

	public Boolean getSummaryable() {
		return summaryable;
	}

	public void setSummaryable(Boolean summaryable) {
		this.summaryable = summaryable;
		addCommandable(summaryable);
	}

	public Boolean getPoolsable() {
		return poolsable;
	}

	public void setPoolsable(Boolean poolsable) {
		this.poolsable = poolsable;
		addCommandable(poolsable);
	}

	public Boolean getCommandable(){
		return commandable;
	}

	public void addCommandable(Boolean able){
		if(able == null){
			return;
		}
		if(commandable == null){
			commandable = true;
		}
		commandable &= able;
	}

	public long getExecuteTime() {
		return executeTime;
	}

	public void setExecuteTime(long executeTime) {
		this.executeTime = executeTime;
	}
}
